package com.pay.service.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mysql.jdbc.StringUtils;
import com.pay.service.dao.MerchantMapper;
import com.pay.service.pojo.Merchant;
import com.pay.service.service.IMerchantService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Wrapper;
import java.util.HashMap;
import java.util.Map;

/**
 * @Title: MerchantServiceImpl
 * @Description:
 * @author: qzz
 * @version: 1.0
 * @date: 2020/6/12 11:04
 */
@Service
public class MerchantServiceImpl extends ServiceImpl<MerchantMapper, Merchant> implements IMerchantService {
	
	@Autowired
	private MerchantMapper merchantMapper;




	@Override
	public Merchant getMechantByMchId(String merchantNo) {
		QueryWrapper<Merchant> wrapper = new QueryWrapper<>();
		wrapper.eq(!StringUtils.isNullOrEmpty(merchantNo),"MERCHANT_NO", merchantNo);
		return merchantMapper.selectOne(wrapper);
	}
}
